package com.qianxunclub.chapter5;

import org.apache.commons.io.IOUtils;

import java.io.IOException;

public class Test {

        public static void main(String args[]) throws IOException {
            String[] commands = {"ls"};
            ProcessBuilder processBuilder = new ProcessBuilder(commands);
            Process process = processBuilder.start();
            String s = IOUtils.toString(process.getInputStream());
            System.out.printf(s);
        }

}
